<template>
  <view class="flex-row align-center margin-bottom-16">
    <view class="label text-right">
      <text class="text-30 color-t3">{{ label }}</text>
    </view>
    <view class="flex-row align-center flex-item margin-left-40">
      <text v-if="!hasSlot" class="text-30 color-t1">{{ value || defaultValue }}</text>
      <slot />
    </view>
  </view>
</template>

<script>
export default {
  name: 'OrderInfoItem',
  props: {
    label: {
      type: String,
      default: ''
    },
    value: {
      type: [String, null],
      default: ''
    },
    defaultValue: {
      type: String,
      default: '暂无'
    },
    hasSlot: {
      type: Boolean,
      default: false
    }
  }
}
</script>

<style scoped lang="scss">
.label{
  width:133rpx;
}
</style>
